//
//  FileListManager.h
//  ICE_Player
//
//  Created by xl on 11-7-25.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "ICE_View_Interface.h"
#import "FileList_Cell.h"
#import "../Functions/file_list.h"
#import "../Functions/file_list_xml_maker.h"

@interface FileListManager : ICE_Table_View_Manager {
	FileList_Cell* p_cell;
    FILE_INFO_LIST* file_list;
    char* cur_dir;
    NSTimer* refresh_timer;
    ICE_Table_View* p_list_view;
    
    
    char* wifi_file_name;
    long long wifi_file_size;
    long long wifi_file_transported_size;
    
    int html_instead_pos;
	
	//for wifi transport
	BOOL wifi_transport_begin;
	BOOL wifi_transport_end;
	BOOL wifi_transport_is_doing;
	BOOL wifi_transport_got_name;
	double wifi_transport_percent;
	char* wifi_transport_name;
	FileList_Cell* wifi_transport_cell;
    
    //deselection flag
    BOOL is_deselect;
    
    char* selected_file_name;
    
    //for file lock
    BOOL do_lock_file;
    BOOL is_locking_files;
    id lock_tar;
    SEL lock_callback;
    id lock_obj;
    pthread_t ht_lock;
}

@property (nonatomic, retain) IBOutlet FileList_Cell* p_cell;
@property FILE_INFO_LIST* file_list;
@property char* cur_dir;
@property ICE_Table_View* p_list_view;

//for wifi transport
@property BOOL wifi_transport_begin;
@property BOOL wifi_transport_end;
@property BOOL wifi_transport_is_doing;
@property BOOL wifi_transport_got_name;
@property double wifi_transport_percent;
@property char* wifi_transport_name;
@property FileList_Cell* wifi_transport_cell;

//for file lock
@property BOOL is_locking_files;

- (void)refresh_file_list;
- (void)start_refresh_file_list;
- (void)stop_refresh_file_list;
- (void)delete_selected_file;
- (void)start_lock_files:(BOOL)is_lock target:(id)target call_back:(SEL)end_notify parameter:(id)obj;

@end
